package org.link.dao;

import org.apache.ibatis.session.SqlSession;
import org.link.bean.User;
import org.link.mapper.UserMapper;
import org.link.util.MyBatisUtil;

public class UserDaoImpl implements UserMapper {

	@Override
	public User selectUserById(int id) {
		SqlSession sqlSession = MyBatisUtil.getSqlSession();
		UserMapper userMapper = sqlSession.getMapper(UserMapper.class);
		User user = userMapper.selectUserById(id);
		return user;
	}
	
	public static void main(String[] args) {
		System.out.println(new UserDaoImpl().selectUserById(3));
	}

}
